package fieldmaps.database;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;

import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Polygon;

public interface GenericMap {

	public void addCell(Coordinate[] coordinates, int value) throws SQLException;
	
	public List<Polygon> getAllCells() throws SQLException;

	public List<Polygon> getCell(Coordinate coordinate);

	public List<Polygon> getCellNeighbors(Polygon cell);

	public List<Polygon> getPolygonsIntersection (Polygon polygon);

	public Map<Object,Double> getWeightedNeighborsArea (Polygon polygon) throws SQLException;

	public void getPolygonsIntersecArea (Polygon polygon, List<Polygon> outputPolygonsIntersection, List<Double> outputPolygonsAreas);

	public Coordinate[] getBorderCoordinates ();
	
	public Double getMapArea();
	
	public void startCellIteration();

	public void resetCellIteration();

	public Polygon getNextCell() throws NoSuchElementException;
	
}
